import Vuex from 'vuex'

import music from './modules/music'
import mmusic from './modules/mmusic'

export default new Vuex.Store({
    namespaced: true,
    state() {
        return {
            userInfo: {},
        }
    },
    mutations: {
        setUserInfo(state, newUserInfo) {
            state.userInfo = newUserInfo
        },
    },
    actions: {
        //获取本地登录信息
        setUserInfoAction({ commit }, userInfo) {
            commit('setUserInfo', userInfo)
        },
    },
    modules: {
        music,
        mmusic
    },
})
